

import 'package:s_mankey/model/favorites_model.dart';
import 'package:s_mankey/provider/view_state_model.dart';
import 'package:s_mankey/service/smonkey_repository.dart';

class FavoritesListVModel extends ViewStateModel {

  List datas;

  Future initData () async {
    setBusy();
    try {
      var res = await SmonkeysRepository.fetchFavoritesList();
      datas = [];
      datas.add(res.like.data);
      datas.add(res.collect.data);
      setIdle();
    } catch (e, s){
      setError(e,s);
    }
  }
}